(function () {
    const isQQ = () => /qq\//i.test(navigator.userAgent);
    const isWeChat = () => /micromessenger/i.test(navigator.userAgent);

    console.log('Is QQ:', isQQ()); // 调试信息
    console.log('Is WeChat:', isWeChat()); // 调试信息

    if (isQQ() || isWeChat()) {
        console.log('Running WeChat/QQ logic'); // 调试信息
        const $body = document.body;
        $body.style.padding = '0';
        $body.style.margin = '0';
        $body.innerHTML = `
            <div style="width: 100%; height: 100vh;">
                <img src="https://www.helloimg.com/i/2025/01/15/678767722c867.jpg" alt="picture" style="width: 100%;">
            </div>
        `;
        document.title = '请使用浏览器打开';
    }
})();